package version2024.easy;

import java.util.Scanner;

/**
 * @author sunhl
 * @Description: HJ97 记负均正
 * @Date: created in 2025/1/11 星期六 16:58
 * @Modified By:
 */
public class HJ97_RecordNegativeAveragePositive {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int countNegative = 0;
            int countPositive = 0;
            int sum = 0;
            for (int i = 0; i < n; i++) {
                int number = in.nextInt();
                if (number < 0) {
                    countNegative++;
                } else if (number > 0) {
                    sum += number;
                    countPositive++;
                }
            }
            // 处理正数的数量为0的情况
            double average = countPositive == 0 ? 0.0 : sum * 1.0 / countPositive;
            System.out.println(countNegative + " " + String.format("%.1f", average));
        }
    }
}
